package com.example.demo.controller;

import com.example.demo.service.TheTestService;
import com.example.demo.utils.R;
import com.example.demo.utils.ReSet;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@CrossOrigin
@RestController
public class TheTestController {

    @Resource
    private TheTestService theTestService;
//    提交试卷
    @PostMapping("inreque")
    public R inreque(Integer user_id, Integer test_paper_id, Integer test_questions_id, Integer questions_options_id) {
        int i = theTestService.inreque(user_id,test_paper_id,test_questions_id,questions_options_id);
        if (i > 0){
            return ReSet.Ok("成功");
        }
        return ReSet.Err("失败");
    }
}
